package com.dpxm.zdbdg.QRCode.api.api;

import com.dpxm.zdbdg.QRCode.api.QrCodeUtils;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
@RestController
@RequestMapping("/QrCode")
public class QrCodeAPI {
    @PostMapping("/anon/coupon/qrCodeTest")
    @ApiOperation(value = "获取二维码")
    public void qrCodeTest(HttpServletResponse response) throws Exception {
        String text = "http://114.132.55.180/:80/";
        String logoPath = "D:\\WEBtest\\zhaopian\\code.jpg";
        //String destPath = "D:\\qrCode\\csdn.jpg";
        QrCodeUtils.encode(text,logoPath,response.getOutputStream(),true);
    }


}
